#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QMessageBox>
#include <QFileDialog>
#include <QBuffer>
#include <vector>            //包含向量类动态数组功能
#include <QSqlDatabase>
#include <QSqlTableModel>
#include <QSqlQuery>
#include <QTimer>
#include <QPixmap>
#include <QDebug>

using namespace std;         //使用vector必须

#include <QMainWindow>

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();
    void  initMainWindow();
    void onTableSelectChange(int row);
    void showCommodityPhoto();
    void loadPreCommodity();
    void onPreNameComboBoxChange();

private slots:
     void on_commodityTableView_clicked(const QModelIndex &index);
  ///  void on_preCategoryCombo_currentIndexChanged(int index);
    void on_newUploadPushButton_clicked();
    void on_newPutinStorePushButton_clicked();
    void on_newClearancePushButton_clicked();

private:
    Ui::MainWindow *ui;
    QImage myPicImag;
    QSqlTableModel *commodity_model;
    QString myMemberID;
    bool myOrdered;
    int myOrderID;
    float myPaySum;

};

#endif // MAINWINDOW_H
